﻿using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using UnityEngine.UI;

/// <summary>
/// 主界面状态
/// </summary>
public class MainMenuState:ISceneState
{
    // 初始化
    public MainMenuState(SceneStateController controller) : base("02MainMenuScene", controller) { }

    /// <summary>
    /// 进入状态时调用
    /// </summary>
    public override void StateStart()
    {
        GameObject.Find("StartButton").GetComponent<Button>().onClick.AddListener(OnStartButtonClick);
    }
    
    // 按钮点击事件
    private void OnStartButtonClick()
    {
        mController.SetState(new BattleState(mController));
    }
}
